package components;

import java.awt.Color;
import java.awt.LayoutManager;

import javax.swing.BorderFactory;
import javax.swing.JPanel;
import javax.swing.border.TitledBorder;

import utils.Settings;

/**
 * This is an aux class for creating JPanels
 */

public class RPSPanel extends JPanel
{
	private static final long serialVersionUID = 1L;


	public RPSPanel()
	{
		super();
		
		init();
	}
	
	public RPSPanel(LayoutManager layout)
	{
		super(layout);
		
		init();
	}
	
	private void init()
	{
		setBackground(new Color(Settings.COLOR_PANEL_BACKGROUND));
	}
	
	public void setBorder(String title)
	{
		super.setBorder(BorderFactory.createTitledBorder(BorderFactory.createEtchedBorder(), title,
	    												 TitledBorder.CENTER, TitledBorder.DEFAULT_POSITION));
	}
}
